﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="DocumentManagement.Views.CreateBaoGao" %>

<%@ Import Namespace="DocumentManagement.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        创建报告</h2>

    <script language="javascript" type="text/javascript">
        function GetYGDSearchUrl() {
            var ygbh = "";
            var wtly = document.getElementById("wtly").value;
            var wtf = document.getElementById("wtf").value;
            var xmzl = document.getElementById("xmzl").value;
            var gjshd = ""; //document.getElementById("gjshd").value;
            var wtr = document.getElementById("wtr").value;

            return "/YuGuDan.x/Search?" + "ygbh=" + ygbh + "&" + "wtly=" + wtly + "&" + "wtf=" + wtf + "&" + "xmzl=" + xmzl + "&wtr=" + wtr;
        }

        function GetBGSearchUrl() {
            var ygbh = "";
            var wtly = document.getElementById("wtly").value;
            var wtf = document.getElementById("wtf").value;
            var xmzl = document.getElementById("xmzl").value;
            var gjshd = ""; //document.getElementById("gjshd").value;

            return "/BaoGao.x/Search?" + "wtly=" + wtly + "&" + "wtf=" + wtf + "&" + "xmzl=" + xmzl;
        }

        function UpdateSearch() {
            var ygdurl = GetYGDSearchUrl();
            var bgurl = GetBGSearchUrl();


            document.getElementById("ygdsearchresult").src = ygdurl;
            document.getElementById("bgsearchresult").src = bgurl;
        }
    </script>

    <div>
        <%using (this.Html.BeginForm("CreateBaoGao", "BaoGao", FormMethod.Post, new { enctype = "multipart/form-data" }))
          { %>
        <table>
            <tr>
                <td>
                    <div>
                        <label for="">
                            文件编号</label><input type="text" name="wjbh" />
                    </div>
                    <div>
                        <label for="">
                            委托来源</label><input type="text" name="wtly" value="<%=this.Model.YGD.wtly %>" id="wtly"
                                onchange="javascript:UpdateSearch()" />
                    </div>
                    <div>
                        <label for="">
                            委托方</label><input type="text" name="wtf" value="<%=this.Model.YGD.wtf %>" id="wtf"
                                onchange="javascript:UpdateSearch()" />
                    </div>
                    <div>
                        <label for="">
                            经办人</label><input type="text" name="wtr" value="<%=this.Model.YGD.wtr %>" id="wtr"
                                onchange="javascript:UpdateSearch()" />
                    </div>
                    <div>
                        <label for="">
                            项目座落</label><input type="text" name="xmzl" value="<%=this.Model.YGD.xmzl %>" id="xmzl"
                                onchange="javascript:UpdateSearch()" />
                    </div>
                    <div>
                        <label for="">
                            建筑面积</label><input type="text" name="jzhmj" value="<%=this.Model.YGD.jzhmj %>" />
                    </div>
                    <div>
                        <label for="">
                            土地面积</label><input type="text" name="tdmj" value="<%=this.Model.YGD.tdmj %>" />
                    </div>
                    <div>
                        <label for="">
                            业态</label>
                        <%=this.Html.DropDownList("yt", new SelectListItem[] {
                      new SelectListItem() { Text = Utility.GetEnumText(YeTai.ZhuZhai), Value=((int)YeTai.ZhuZhai).ToString(), Selected= ((int)YeTai.ZhuZhai == this.Model.YGD.yt)},
                      new SelectListItem() { Text = Utility.GetEnumText(YeTai.GongYe), Value=((int)YeTai.GongYe).ToString(), Selected= ((int)YeTai.GongYe == this.Model.YGD.yt)},
                      new SelectListItem() { Text = Utility.GetEnumText(YeTai.ShangYe), Value=((int)YeTai.ShangYe).ToString(), Selected= ((int)YeTai.ShangYe == this.Model.YGD.yt)},
                      new SelectListItem() { Text = Utility.GetEnumText(YeTai.BanGong), Value=((int)YeTai.BanGong).ToString(), Selected= ((int)YeTai.BanGong == this.Model.YGD.yt)},
                      new SelectListItem() { Text = Utility.GetEnumText(YeTai.QiTa), Value=((int)YeTai.QiTa).ToString(), Selected= ((int)YeTai.QiTa == this.Model.YGD.yt)}
                  })
                        %>
                    </div>
                </td>
                <td>
                    <div>
                        <label for="">
                            竣工日期</label><input type="text" name="jgrq" value="<%=this.Model.YGD.jgrq %>" />
                    </div>
                    <div>
                        <label for="">
                            建筑层高</label><input type="text" name="jzhcg" value="<%=this.Model.YGD.jzhcg %>" />
                    </div>
                    <div>
                        <label for="">
                            评估总价</label><input type="text" name="pgzj" />
                    </div>
                    <div>
                        <label for="">
                            评估单价</label><input type="text" name="pgdj" />
                    </div>
                    <div>
                        <label for="">
                            评估净值</label><input type="text" name="pgjzh" />
                    </div>
                    <div>
                        <label for="">
                            现场勘查员</label><input type="text" name="xchkchy" />
                    </div>
                    <div>
                        <label for="">
                            项目区域</label><input type="text" name="xmqy" value="<%=this.Model.YGD.xmqy %>" />
                    </div>
                </td>
                <td>
                    <div>
                        <label>
                            估价起始日期</label>
                        <input type="text" name="gjqshrq" />
                    </div>
                    <div>
                        <label for="">
                            估价完成日期</label><input type="text" name="pgwchrq" />
                    </div>
                    <div>
                        <label for="">
                            估价时点</label><input type="text" name="gjshd" value="<%=this.Model.YGD.gjshd %>" id="gjshd"
                                onchange="javascript:UpdateSearch()" />
                    </div>
                    <div>
                        <label for="">
                            估价作业人员</label><input type="text" name="gjzyry" />
                    </div>
                    <div>
                        <label>
                            项目名称</label>
                        <input type="text" name="xmmch" />
                    </div>
                    <div>
                        <label>
                            产权人</label>
                        <input type="text" name="chqr" />
                    </div>
                    <div>
                        <label>
                            估价目的</label>
                        <input type="text" name="gjmd" />
                    </div>
                </td>
                <td>
                    <div>
                        <label>
                            估价方法</label>
                        <input type="text" name="gjff" />
                    </div>
                    <div>
                        <label>
                            土地登记用途</label>
                        <input type="text" name="tddjyt" />
                    </div>
                    <div>
                        <label>
                            房屋类型</label>
                        <input type="text" name="fwlx" />
                    </div>
                    <div>
                        <label>
                            土地取得方式</label>
                        <input type="text" name="tdqdfsh" />
                    </div>
                    <div>
                        <label>
                            容积率</label>
                        <input type="text" name="rjl" />
                    </div>
                    <div>
                        <label>
                            楼面地价</label>
                        <input type="text" name="lmdj" />
                    </div>
                    <div>
                        <label>
                            土地总价格</label>
                        <input type="text" name="tdzjg" />
                    </div>
                    <div>
                        <label for="">
                            报告附件</label><input type="file" name="file" />
                    </div>
                    <%if (!string.IsNullOrEmpty(this.Model.YGD.ygbh))
                      { %>
                    <div>
                        <a target="_blank" href="<%=this.Url.Action("ShowYuGuDanDetail", "yugudan", new {id = this.Model.YGD.id}) %>">
                            相关联的预估单：<%=this.Model.YGD.ygbh%><input type="hidden" value="<%=this.Model.YGD.id%>"
                                name="ygId" />
                        </a>
                    </div>
                    <%} %>
                </td>
            </tr>
        </table>
        <div>
            <input type="submit" value="创建报告并提交一审" />
        </div>
        <div>
            <iframe src="" width="100%" height="500px" id="ygdsearchresult"></iframe>
            <iframe src="" width="100%" height="500px" id="bgsearchresult"></iframe>
        </div>
        <%} %>
    </div>
</asp:Content>
